module Main where

bignum = 10000000000
powTrunc x y = powTrunc' x y 1
    where
      powTrunc' _ 0 res = (res * 28433 + 1)
      powTrunc' x (n + 1) res = 
          powTrunc' x n $! ((res * x) `mod` bignum)

putStrTrunc i str = putStrLn $ drop (length str - i) str 
    
main = putStrTrunc 10 $  show $  2 `powTrunc` 7830457